\(\int \frac {1}{4-2 \sqrt {3} x+x^2} \, dx\) [79]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 12 \[ \int \frac {1}{4-2 \sqrt {3} x+x^2} \, dx=-\arctan \left (\sqrt {3}-x\right ) \]

[Out]

arctan(x-3^(1/2))

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {632, 210} \[ \int \frac {1}{4-2 \sqrt {3} x+x^2} \, dx=-\arctan \left (\sqrt {3}-x\right ) \]

[In]

Int[(4 - 2*Sqrt[3]*x + x^2)^(-1),x]

[Out]

-ArcTan[Sqrt[3] - x]

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rubi steps \begin{align*} \text {integral}& = -\left (2 \text {Subst}\left (\int \frac {1}{-4-x^2} \, dx,x,-2 \sqrt {3}+2 x\right )\right ) \\ & = -\tan ^{-1}\left (\sqrt {3}-x\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \frac {1}{4-2 \sqrt {3} x+x^2} \, dx=-\arctan \left (\sqrt {3}-x\right ) \]

[In]

Integrate[(4 - 2*Sqrt[3]*x + x^2)^(-1),x]

[Out]

-ArcTan[Sqrt[3] - x]

Maple [A] (verified)

Time = 3.56 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.75

method result size
default \(\arctan \left (x -\sqrt {3}\right )\) \(9\)
risch \(\arctan \left (x -\sqrt {3}\right )\) \(9\)
parallelrisch \(\frac {i \ln \left (x +i-\sqrt {3}\right )}{2}-\frac {i \ln \left (x -\sqrt {3}-i\right )}{2}\) \(28\)

[In]

int(1/(4+x^2-2*3^(1/2)*x),x,method=_RETURNVERBOSE)

[Out]

arctan(x-3^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {1}{4-2 \sqrt {3} x+x^2} \, dx=-\arctan \left (-x + \sqrt {3}\right ) \]

[In]

integrate(1/(4+x^2-2*x*3^(1/2)),x, algorithm="fricas")

[Out]

-arctan(-x + sqrt(3))

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.58 \[ \int \frac {1}{4-2 \sqrt {3} x+x^2} \, dx=\operatorname {atan}{\left (x - \sqrt {3} \right )} \]

[In]

integrate(1/(4+x**2-2*x*3**(1/2)),x)

[Out]

atan(x - sqrt(3))

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.67 \[ \int \frac {1}{4-2 \sqrt {3} x+x^2} \, dx=\arctan \left (x - \sqrt {3}\right ) \]

[In]

integrate(1/(4+x^2-2*x*3^(1/2)),x, algorithm="maxima")

[Out]

arctan(x - sqrt(3))

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.67 \[ \int \frac {1}{4-2 \sqrt {3} x+x^2} \, dx=\arctan \left (x - \sqrt {3}\right ) \]

[In]

integrate(1/(4+x^2-2*x*3^(1/2)),x, algorithm="giac")

[Out]

arctan(x - sqrt(3))

Mupad [B] (verification not implemented)

Time = 9.30 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.67 \[ \int \frac {1}{4-2 \sqrt {3} x+x^2} \, dx=\mathrm {atan}\left (x-\sqrt {3}\right ) \]

[In]

int(1/(x^2 - 2*3^(1/2)*x + 4),x)

[Out]

atan(x - 3^(1/2))